// 引入具体组件
import hzxBorder from './border'
import hzxRoller from './number'
import hzxScroll from './scroll'
import hzxLoading from './loading'
import HzxDecoration from './decoration'
import HzxIndicator from './indicator'

// 汇总到components数组中
const components = [
  hzxBorder,
  hzxRoller,
  hzxScroll,
  hzxLoading,
  HzxDecoration,
  HzxIndicator
]

// 定义install方法遍历组件
const install = function(Vue, opts = {}) {
  components.forEach(component => {
    Vue.component(component.name, component)
  })
}

// 导出
export default {
  install
}
